home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / dev / www-talk.9301-9306.Z / www-talk.9301-9306 / text0428.txt < prev    next >
Encoding:
Text File  |  1995-04-24  |  2.9 KB  |  79 lines

  1.  
  2. >Three questions, 
  3. >
  4. >  1) If we now expect quotes around tags, are we still meant to understand % as
  5. >     an escape character within tags?
  6.  
  7. In short, I think so.
  8.  
  9. These dang things get parsed twice: once by the SGML parser, and once
  10. by the URL parser.
  11.  
  12. After the HREF=, the SGML parser is looking for an attribute value,
  13. which may be a token or a literal. The syntax of a URL conflicts with
  14. the syntax of a token, so you've got to use a literal, i.e. you've
  15. got to put quotes around it.
  16.  
  17. To compute the value of the HREF attribute, the SGML parser grabs
  18. everything between ""s (or ''s, actually. In fact, it expands
  19. &entity; references too!).
  20.  
  21. Then you hand the value of the HREF attribute to the URL parser.
  22. It better be a legal URL at this point. I don't know if the URL
  23. parsing code can handle spaces in a URL or not. If not, they've
  24. got to be represented by the %nn construct.
  25.  
  26. NOTE: There's an SGML construct: &#SPACE; or { designed for the same
  27. purpose. We might want to remove the quoting mechanism from the
  28. URL spec, and say that you use whatever quoting mechanisms the
  29. enclosing data format requires.
  30.  
  31.  
  32. >  2) Which of the following do I need to support, and which is the "approved"      
  33. >     method of accessing gopher?
  34. >
  35. >         href="gopher://gopher.micro.umn.edu:70/00/Some Stuff"
  36.  
  37. This is legal SGML -- dunno if it's a legal URL.
  38.  
  39. >         href="gopher://gopher.micro.umn.edu:70/00/Some%20Stuff"
  40.  
  41. This is probably your best bet for the current linemode code.
  42.  
  43. >         href=gopher://gopher.micro.umn.edu:70/00/Some%20Stuff
  44.  
  45. SGML parsers won't grok this.
  46.  
  47. For starters, you've got kind of a bad design for handling SGML
  48. attributes: you parse them twice: once to stick them in the param
  49. resource, and once to take them out of the param resource and stick
  50. them in the href and name resources.
  51.  
  52. Rather than a param resource, the parsing code should build an XtArglist
  53. with the attribute names and values. Then it can just call XtSetValues
  54. when it's done parsing the start tag. This would be a minor modification
  55. to my current version of the MidasWWW code using my HTML parsing library.
  56.  
  57. >  3) Is the % meant to act as an escape character in search strings? ie
  58. >
  59. >         href="http://slacvm.slac.stanford.edu/FIND/PARTICLE?PI%nn"
  60. >
  61. >     meant to find entries for PI+ ? (where nn is the ascii code for +).
  62.  
  63. Yeah... I've got a bunch of questions like this one. My understanding
  64. is that everything after the scheme: is defined by the individual scheme.
  65. It's not safe to just replace %nn by the corresponding ASCII character
  66. in all URLs. The %nn quoting mechanism is specific to the gopher scheme.
  67. (It might be used by other schemes too, but it's not a universal mechanism.)
  68.  
  69. I've got some design ideas for the WWW library that I think would obviate
  70. the need for implemntors like Tony to even mess with this stuff.
  71.  
  72. Details as the develop...
  73.  
  74. Tony: I'll send you my HTML parsing work separately.
  75.  
  76. Dan
  77.  
  78.  
  79.